import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqEntityIdHelper } from "../Public/SeqEntityIdHelper";
import { SeqMiniGroupInfoHelper } from "./SeqMiniGroupInfoHelper";
import { DictIntIntHelper } from "../Public/DictIntIntHelper";
import { SeqPointHelper } from "../Public/SeqPointHelper";
import { DictIntStrHelper } from "../Public/DictIntStrHelper";
import { SeqIntHelper } from "../Public/SeqIntHelper";
import { SEntityId } from "../Public/SEntityId";
type int = number;
//class SEntityInfo
    
    export  class SEntityInfo extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        
        {
            SEntityInfo._regist = new SEntityInfo(true);
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SEntityInfo();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.entityId.__write(arg1);
            arg1.writeString(this.name);
            arg1.writeInt(this.code);
            arg1.writeInt(this.life);
            arg1.writeInt(this.maxLife);
            arg1.writeInt(this.mana);
            arg1.writeInt(this.maxMana);
            arg1.writeByte(this.camp);
            arg1.writeByte(this.sex);
            arg1.writeShort(this.career);
            arg1.writeShort(this.careerEnable);
            arg1.writeInt(this.guildId);
            arg1.writeString(this.guildName);
            arg1.writeByte(this.guildLevel);
            arg1.writeByte(this.guildPosition);
            arg1.writeByte(this.VIP);
            arg1.writeByte(this.gene);
            arg1.writeShort(this.talent);
            arg1.writeByte(this.fightModel);
            arg1.writeByte(this.level);
            arg1.writeByte(this.reinLevel);
            arg1.writeByte(this.status);
            SeqEntityIdHelper.write(arg1, this.toEntitys);
            arg1.writeShort(this.speed);
            arg1.writeByte(this.groupStatus);
            arg1.writeByte(this.fighting);
            arg1.writeString(this.talk);
            arg1.writeByte(this.direction);
            SeqMiniGroupInfoHelper.write(arg1, this.groupId);
            SeqEntityIdHelper.write(arg1, this.toEntitys2);
            arg1.writeString(this.reserveJs);
            DictIntIntHelper.write(arg1, this.weapons);
            SeqPointHelper.write(arg1, this.points);
            DictIntStrHelper.write(arg1, this.titles);
            SeqIntHelper.write(arg1, this.buffers);
            arg1.writeByte(this.action);
            arg1.writeInt(this.modelId);
            arg1.writeByte(this.force);
            arg1.writeByte(this.wuxingType);
            arg1.writeByte(this.avatarId);
            arg1.writeByte(this.photo);
            arg1.writeByte(this.crossGroupStatus);
            SeqMiniGroupInfoHelper.write(arg1, this.crossGroupId);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.name = arg1.readString();
            this.code = arg1.readInt();
            this.life = arg1.readInt();
            this.maxLife = arg1.readInt();
            this.mana = arg1.readInt();
            this.maxMana = arg1.readInt();
            this.camp = arg1.readByte();
            this.sex = arg1.readByte();
            this.career = arg1.readShort();
            this.careerEnable = arg1.readShort();
            this.guildId = arg1.readInt();
            this.guildName = arg1.readString();
            this.guildLevel = arg1.readByte();
            this.guildPosition = arg1.readByte();
            this.VIP = arg1.readByte();
            this.gene = arg1.readByte();
            this.talent = arg1.readShort();
            this.fightModel = arg1.readByte();
            this.level = arg1.readByte();
            this.reinLevel = arg1.readByte();
            this.status = arg1.readByte();
            this.toEntitys = SeqEntityIdHelper.read(arg1);
            this.speed = arg1.readShort();
            this.groupStatus = arg1.readByte();
            this.fighting = arg1.readByte();
            this.talk = arg1.readString();
            this.direction = arg1.readByte();
            this.groupId = SeqMiniGroupInfoHelper.read(arg1);
            this.toEntitys2 = SeqEntityIdHelper.read(arg1);
            this.reserveJs = arg1.readString();
            this.weapons = DictIntIntHelper.read(arg1);
            this.points = SeqPointHelper.read(arg1);
            this.titles = DictIntStrHelper.read(arg1);
            this.buffers = SeqIntHelper.read(arg1);
            this.action = arg1.readByte();
            this.modelId = arg1.readInt();
            this.force = arg1.readByte();
            this.wuxingType = arg1.readByte();
            this.avatarId = arg1.readByte();
            this.photo = arg1.readByte();
            this.crossGroupStatus = arg1.readByte();
            this.crossGroupId = SeqMiniGroupInfoHelper.read(arg1);
            return;
        }

        public /* const */_type: int=23;

        public /* var */maxMana: int;

        public /* var */camp: int;

        public /* var */sex: int;

        public /* var */career: int;

        public /* var */careerEnable: int;

        public /* var */guildId: int;

        public /* var */guildName: string;

        public /* var */guildLevel: int;

        public /* var */guildPosition: int;

        public /* var */VIP: int;

        public /* var */gene: int;

        public /* var */talent: int;

        public /* var */fightModel: int;

        public /* var */level: int;

        public /* var */reinLevel: int;

        public /* var */status: int;

        public /* var */toEntitys: Array<any>;

        public /* var */speed: int;

        public /* var */mana: int;

        public /* var */fighting: int;

        public /* var */talk: string;

        public /* var */direction: int;

        public /* var */groupId: Array<any>;

        public /* var */toEntitys2: Array<any>;

        public /* var */reserveJs: string;

        public /* var */weapons: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */points: Array<any>;

        public /* var */titles: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */buffers: Array<any>;

        public /* var */action: int;

        public /* var */modelId: int;

        public /* var */entityId: SEntityId;

        public /* var */wuxingType: int;

        public /* var */avatarId: int;

        public /* var */photo: int;

        public /* var */crossGroupStatus: int;

        public /* var */crossGroupId: Array<any>;

        public /* var */groupStatus: int;

        public /* var */name: string;

        public /* var */code: int;

        public /* var */life: int;

        public /* var */maxLife: int;

        public static /* var */_regist: SEntityInfo;

        public /* var */force: int;
    }
